{% extends "../base.html" %}

{% block header %}
<script type="text/javascript" src="/js/util.js"></script>
{% endblock header %}

{% block content %}
<blockquote>
<H1>Albums</H1>

{% ifequal user.userid 1 %}
<form action="/album/delete" method="post">
{% endifequal %}

<table summary="">
{% for lst in albums %}
<tr>
{% for album in lst %}
<td><a href="/album/show/{{album.albumid}}">
	<img width=240 height=320 src="/album/getcover/{{album.albumid}}"><br/>
	{{album.name}}</a>
  {% if is_admin %}
	<input type="checkbox" name="albumid" value="{{album.albumid}}">
  {% endif %}
</td>
{%endfor %}
</tr>
{% endfor %}
</table>

{% if is_admin %}
<input type="submit" value="delete" onclick="return confirmDelete('Are you sure?');">
{% endif %}
</form>

</blockquote>

<table width=100% cellpadding=0 cellspacing=0 summary="">
<tr><td bgcolor="#3366cc"><img alt="" width=1 height=4></td></tr>
</table>

  <div align="center" id="nav2">
	  {% ifnotequal prevpage -1 %}
	  <a href="/album/list/{{prevpage}}/{{limit}}">Previous Page</a>
	  {% else %}
	  {% endifnotequal %}
	  {% ifnotequal nextpage 0 %}
	  <a href="/album/list/{{nextpage}}/{{limit}}">Next Page</a>
	  {% else %}
	  {% endifnotequal %}
  </div>

{% endblock content %}